<template>
	<view>
		<!-- 轮播图列表 -->
		<swiper v-if="isSwiper" next-margin="30rpx" :style="{ height: `${200 * rows}rpx` }" >
			<swiper-item v-for="(item, index) in column" :key="index">
				<l-list-item v-for="it in courseData.slice(index * rows, (index + 1) * rows)" :key="it.id" :item="it"></l-list-item>
			</swiper-item>
		</swiper>
		
		<!-- 非轮播图列表 -->
		<view v-else>
			<l-list-item v-for="(item, index) in courseData" :key="index" :item="item"></l-list-item>
		</view>
	</view>
</template>

<script>
	import lListItem from "./l-list-item.vue"

	export default {
		name: "l-list-wrap",
		props: {
			column: Number,
			rows: Number,
			courseData: Array,
			isSwiper: Boolean
		},
		components: {
			lListItem
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss">

</style>
